package com.code.day16;

public class LambdaUSB {
    public static void main(String[] args) {
        method(new USB() {
            @Override
            public String open(String name) {
                return name + "打开成功";
            }
        });
        System.out.println("======================");
        method(name ->name+"打开成功");

        System.out.println("======================");
    }

    public static void method(USB usb) {
        String result = usb.open("鼠标");
        System.out.println( result);
    }

}
